import axios from '@/libs/api.request'

export const getKnowledgepointList = (seachParams) => {
  return axios.request({
    url: 'knowledgepoints',
    method: 'get',
    params: seachParams
  })
}

export const getKnowledgepoint = (id) => {
  return axios.request({
    url: 'knowledgepoints/' + id,
    method: 'get'
  })
}

export const addKnowledgepoint = (data) => {
  return axios.request({
    url: 'knowledgepoints',
    method: 'post',
    data: data
  })
}

export const updateKnowledgepoint = (data) => {
  return axios.request({
    url: 'knowledgepoints',
    method: 'put',
    data: data
  })
}

export const deleteKnowledgepoint = (id) => {
  return axios.request({
    url: 'knowledgepoints/'+id,
    method: 'delete'
  })
}